package com.project.bohang.controller;


import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.project.bohang.common.model.Response;
import com.project.bohang.common.model.page.PageResult;
import com.project.bohang.entity.UserIsolate;
import com.project.bohang.entity.Visit;
import com.project.bohang.pojo.dto.UserIsolateDto;
import com.project.bohang.pojo.dto.VisitDto;
import com.project.bohang.pojo.vo.UserIsolateVo;
import com.project.bohang.pojo.vo.VisitVo;
import com.project.bohang.service.UserIsolateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import com.project.bohang.controller.BaseController;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *  隔离信息管理(用户)
 *
 * @author bohang
 * @since 2022-03-27
 */
@Controller
@RequestMapping("/userIsolate")
@ResponseBody
public class UserIsolateController extends BaseController {

    @Autowired
    private UserIsolateService userIsolateService;

    /**
     * 隔离信息列表
     *
     * @param dto
     * @return
     */
    @PostMapping("/list")
    public Response<PageResult<UserIsolateVo>> selectList(@RequestBody UserIsolateDto dto){
        return Response.success(getDataTable(userIsolateService.selectList(dto)));
    }


    /**
     * 隔离信息详情
     *
     * @param req
     * @return
     */
    @PostMapping("/detail")
    public Response<UserIsolate> detail(@RequestBody UserIsolate req) {
        UserIsolate entity = userIsolateService.getById(req.getId());
        return Response.success(entity);
    }


}

